/*
***********************************************************************
Software License Agreement

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
***********************************************************************

Author:
Hisham Kedjour (hkedjour@gmail.com)
*/
using System;
using System.Runtime.InteropServices;

namespace JooJooTouchDriver
{
	public class EGalaxTouch
	{
		public const ulong BRANCH_ENABLED = 0x80000000;

		[DllImport("xtkutility.dll")]
		public static extern IntPtr CreateDevice([MarshalAs(UnmanagedType.LPStr)]string szSymbolicName);

		[DllImport("xtkutility.dll")]
		public static extern bool CloseDevice(IntPtr hFile);

		public delegate bool EnumerateTouchscreenCallback(IntPtr pContext, [MarshalAs(UnmanagedType.LPStr)]string szSymbolicName, uint nType);

		[DllImport("xtkutility.dll")]
		public static extern int EnumerateTouchInstance(IntPtr hWnd, IntPtr pContext, EnumerateTouchscreenCallback pCallback);

		[DllImport("xtkutility.dll")]
		public static extern void EnableTouch(IntPtr hFile, bool bEnable);

		[DllImport("xtkutility.dll")]
		public static extern bool StartDeviceThread(IntPtr hFile);

		[DllImport("xtkutility.dll")]
		public static extern bool StopDeviceThread(IntPtr hFile);

		[DllImport("xtkutility.dll")]
		public static extern void SetBranchFormat(IntPtr hFile, ref ulong pInfo);

		[DllImport("xtkutility.dll")]
		public static extern bool GetBranchFormat(IntPtr hFile, ref ulong pInfo);

		[DllImport("xtkutility.dll")]
		public static extern int RegisterTPNotifyMessage(IntPtr hFile, IntPtr hWnd, uint imsg);
	}
}